<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
当前SessionId:<span th:text="${#httpSession.getId()}"></span>

当前服务器端口号:<span th:text="${#request.getServerPort()}"></span>

<form action="/login" method="post">
用户名：<input name="userName" type="text"/>密码：<input type="password" name="password"/>
    <input type="submit">
</form>
</body>
</html>